using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class NajaviSe : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }

        protected void LoginButton_Click(object sender, EventArgs e)
    {

        RN_WebService servis = new RN_WebService();

        int pom = servis.proveriKorisnik(UserName.Text, Password.Text);
        if (pom == 1)
        {
            if (UserName.Equals("admin"))
            {
                Session["aname"] = UserName.Text;
                Response.Redirect("Azuriranje.aspx");
            }
            else
            {
                Session["uname"] = UserName.Text;
                Server.Transfer("Prebaruvanje.aspx", true);
            }
        }
        else
        {

            poraka.Text = "Your're not logged in!";
            poraka.Visible = true;


        }
    }

    }

